package com.example.layered_arch.example.controller;

import com.example.layered_arch.example.dto.LoginRequest;
import com.example.layered_arch.example.service.UserAuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/api/auth")
public class UserAuthController {

    @Autowired
    private UserAuthService userAuthService;

    @PostMapping("/login")
    public Map<String, String> login(@RequestBody LoginRequest loginRequest) {
        return userAuthService.login(loginRequest);
    }
}
